import request from "@/utils/request";

//新增接口
export const addShiftSchedule = (data) => {
  return request({
    url: "plan/planSchedule",
    method: "post",
    data,
  });
};
//编辑接口
export const updateShiftSchedule = (data) => {
  return request({
    url: "plan/planSchedule",
    method: "put",
    data,
  });
};
//查询接口
export const listShiftSchedule = (params) => {
  return request({
    url: "plan/planSchedule/list",
    method: "get",
    params,
  });
};
//删除接口
export const delShiftSchedule = (ids) => {
  return request({
    url: `plan/planSchedule/${ids}`,
    method: "delete",
  });
};
//数据回显接口
export const getShiftSchedule = (id) => {
  return request({
    url: `plan/planSchedule/${id}`,
    method: "get",
  });
};

//启用
export const planEnable = (data) => {
  return request({
    url: "plan/planSchedule/enable?id=" + data.id,
    method: "post",
    data,
  });
};
